﻿<Window x:Class="WpfTrainingApp.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WpfTrainingApp"
    Title="Window1" Height="277" Width="289" Background="{StaticResource BackgroundColour}">
    <Window.Resources>
        <local:BoolToVisibilityConverter x:Key="boolToVisibilityConverter" />
    </Window.Resources>
    <Grid Height="145" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="115*" />
            <ColumnDefinition Width="163*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
            <TextBlock Grid.Row="0" Grid.Column="0" Text="Name:"/>
            <TextBlock Grid.Row="1" Grid.Column="0" Text="Age:"/>

            <TextBox Grid.Row="0" Grid.Column="1" Name="tbName" Text="{Binding Path=Name.Value}" />
            <TextBox Grid.Row="1" Grid.Column="1" Name="tbAge" Text="{Binding Path=Age.Value}" />
            <Button Name="button1" Grid.Row="2" Margin="0,6,0,0" Height="33" VerticalAlignment="Top">Button</Button>
            <Button Name="btnSave" Visibility="{Binding Path=IsDirty, Converter={StaticResource boolToVisibilityConverter}}" Content="Save" Grid.Row="2" Grid.Column="1" Margin="15,6,33,0" Height="33" VerticalAlignment="Top" />
    </Grid>
</Window>
